package com.example.campsystem.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.campsystem.entity.User;
import com.example.campsystem.service.UserService;
import com.example.campsystem.mapper.UserMapper;
import org.springframework.stereotype.Service;
import java.util.Date;

/**
* @author GJC
* @description 针对表【user】的数据库操作Service实现
* @createDate 2025-05-04 15:35:29
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
    implements UserService {
    @Override
    public boolean update(User user) {
        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("id", user.getId());
        queryWrapper.eq("openId", user.getOpenid());
        return this.baseMapper.update(user, queryWrapper) > 0;
    }
}




